layui.use(['element'], function() {
	
	
	var element = layui.element;
	$(document).on("click", ".li_item", function() {
		var dataId = $(this).data("id");
		if($("#ifm_" + dataId).length > 0) {
			element.tabChange("demo", "lid_" + dataId)
		} else {
			var title = $(this).text();
			var url = $(this).data("url");
			element.tabAdd("demo", {
				title: title,
				content: "<iframe src='" + url + "' id='ifm_" + dataId + "'></iframe>",
				id: "lid_" + dataId
			});
			element.tabChange("demo", "lid_" + dataId);
		}
	});
	
});